<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const str = "abc,ab,abccccc,ef";
      console.log(str.match(/abc?/g)); //ab/abc {0,1}
      console.log(str.match(/abc*/g)); //ab/abccccc {0,}
      console.log(str.match(/abc+/g)); //abc/abccccc {1,}
    </script>
  </body>
</html>
